﻿@import "variables";

// Lazy loading of images. See /js/site.js for more
.notloaded {
    opacity: 0;
    transform: scale(.9);
}

.loaded {
    background: none;
    opacity: 1;
    transform: scale(1);
    transition: all 400ms ease-in;
    // Don't animate when the reduced motion accessibility option
    // has been enabled in the browser or OS. Safari is supporting this
    @media screen and (prefers-reduced-motion: reduce) {
        transition: none;
    }
}

a:focus,
a:active,
input:focus,
textarea:focus {
    outline: 2px solid lighten($link_color, 20%);
}

noscript p {
    background-color: crimson;
    line-height: 2em;
    padding: 0 10px;
    color: white;
    font-size: .9em;
}

.video {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;

    iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }
}

.categories, .tags {
    list-style: none;
    display: inline;
    padding: 0;
    margin-right: 20px;

    li {
        display: inline-block;

        &:not(:last-child):after {
            content: ", ";
        }
    }
}

.socialsharing {
    text-align: center;

    a {
        display: inline-block;
        padding: .7em;
        line-height: 0;
        margin-bottom: 2em;
    }

    path {
        fill: gray;
    }

    svg {
        width: 26px;
        height: 26px;
    }
}

.pagination {
    padding-bottom: 2em;
    margin-top: 1em;

    a {
        border: 1px solid $comments_input_border-color;
        background: $comments_bg_color;
        color: $text_color;
        display: inline-block;
        padding: 4px 15px;
        text-decoration: none;

        &[rel=next] {
            float: right;
        }

        &:hover,
        &:focus {
            background: $comments_border-color;
        }
    }
}

.sitefooter {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: $text_color;
    color: white;
    height: $footer_height;
    font-size: .9em;

    .container {
        margin: 1em auto;
    }

    ul {
        list-style: none;
        padding: 0;
    }

    li {
        display: inline-block;

        &:not(:last-child):not(:first-child):before {
            content: "\00A0| \00A0"
        }

        &:last-child {
            float: right;
        }
    }

    a {
        color: white;
    }

    p {
        position: absolute;
        bottom: .5em;
        left: 0;
        text-align: center;
        width: 100%;
        font-size: .9em;
    }
}

@media print {
    @page {
        margin: 2cm;
    }

    body {
        color: #000;
        background: #fff;
        font: 12pt/1.5 Calibri, serif;
        -webkit-print-color-adjust: exact;
    }

    nav, aside, footer, #comments, [data-src], .video {
        display: none;
    }

    article {
        page-break-after: always;
    }

    h1, h2, h3, h4, h5, h6, img {
        page-break-after: avoid;
        page-break-inside: avoid
    }

    blockquote, table, pre {
        page-break-inside: avoid;
    }

    ul, ol, dl {
        page-break-before: avoid
    }

    .post pre {
        background: none;
        border: none;
        box-shadow: none;
        font-family: monospace;
    }

    a[href^="http"]:after, a[href^="//"]:after {
        content: " <" attr(href) "> ";
    }
}
